GDB command Overview-------
After starting GDB, you will be brought into the debugging environment of GDB. You can use the gdb command to start debugging the program. The command of GDB can be viewed using the Help Command, as shown
Turn from: http://blog.csdn.net/haoahua/article/details/2056854
the original text is from the Chenhao column (http://blog.csdn.net/haoel/), thanks to the author for publishing such a good article.
Debug a program with GDB
Debug the program with
GDB (GNU Debugger) is a powerful command-line debugging tool. You know the power of the command line is that it can form an execution sequence and form a script. The software under UNIX is full of command line, which gives the program development a
http://www.wuzesheng.com/?p=1327 teaches you to play the GDB (a)--kind: Start gdb start debuggingWritten in the first: GDB is a UNIX-related operating system in C/D program Development is an indispensable tool, its powerful, is not comparable to
Basic Usage
1. Introduction
GDB (GNU Debugger) is a debugging tool for GCC. Its powerful, now described as follows:GDB is the main help you complete the following four aspects of the function:1. Start your program, you can follow your custom
The use and summary of GDB debug commandsGDB is a command-line debugging tool in a UNIX environment. If you need to use the GDB debugger, add the-G option to GCC. The following command section is a simplified version, such as using L instead of list
command-line debugging tools in a UNIX environment: gdbIf you need to use the GDB debugger, add the-G option to GCC.The following command section is a simplified version, such as using L instead of list and so on.1. Basic Commands1) Enter GDB #gdb
1. Basic command
1 Enter GDB #gdb test
Test is the program to debug, generated by GCC test.c-g-o test. Enter the back-prompt into (GDB).
2) View Source (GDB) L
The source code will be the line number hint.
If you need to see the functions
1. Basic commands
1) Go to GDB # gdb test
Test is the program to be debugged. It is generated by gcc test. c-g-o test. Enter the prompt and change to (gdb ).
2) view the source code (gdb) l
The source code prompts the line number.
If you need to
1. Set a breakpoint)
We use the break command to set breakpoints. There are several ways to set breakpoints on the front:
Break Stops when you enter the specified function. In C ++, you can use the class: function or function (type, type) format to
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.